<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改员工')" />
    <th:block th:include="include :: select2-css"/>
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-employee-edit" th:object="${stbEmployee}">
            <input name="empId" th:field="*{empId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">所属企业：</label>
                <div class="col-sm-8">
                    <select name="compId" class="form-control m-b" required  th:field="*{compId}">
                        <option value="">--请选择--</option>
                        <option  th:each="a:${companyList}" th:text="${a.compName}"
                        th:value="${a.compId}" th:selected="${compId eq a.compId}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">员工姓名：</label>
                <div class="col-sm-8">
                    <input name="empName" th:field="*{empName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">员工电话：</label>
                <div class="col-sm-8">
                    <input name="empPhone" th:field="*{empPhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">员工标签：</label>
                <div class="col-sm-8">
                    <div class="check-box" th:each="dict : ${@dict.getType('talent_tabs')}">
                        <input type="checkbox" th:id="${'empTabs_' + dict.dictCode}" name="empTabs" th:value="${dict.dictValue}" th:field="*{tabIds}">
                        <label th:for="${'empTabs_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <!-- 
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否人才：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('is_or_not')}">
                        <input type="radio" th:id="${'isTalent_' + dict.dictCode}" name="isTalent" th:value="${dict.dictValue}" th:field="*{isTalent}" required>
                        <label th:for="${'isTalent_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            -->
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                       <textarea type="text" name="remark" class="form-control" placeholder="请输入备注"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js"/>
    <th:block th:include="include :: distpicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/employee";
        $("#form-employee-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-employee-edit').serialize());
            }
        }
    </script>
</body>
</html>